<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Trocket\V20230308\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeTopic response structure.
 *
 * @method string getInstanceId() Obtain Instance ID
 * @method void setInstanceId(string $InstanceId) Set Instance ID
 * @method string getTopic() Obtain Topic name
 * @method void setTopic(string $Topic) Set Topic name
 * @method string getTopicType() Obtain Topic type.
UNSPECIFIED: not specified.
NORMAL: normal message.
FIFO: sequential message.
DELAY: delayed message.
TRANSACTION: transaction message.
 * @method void setTopicType(string $TopicType) Set Topic type.
UNSPECIFIED: not specified.
NORMAL: normal message.
FIFO: sequential message.
DELAY: delayed message.
TRANSACTION: transaction message.
 * @method string getRemark() Obtain Remarks
 * @method void setRemark(string $Remark) Set Remarks
 * @method integer getCreatedTime() Obtain Creation time. **It is a Unix timestamp (ms).**
 * @method void setCreatedTime(integer $CreatedTime) Set Creation time. **It is a Unix timestamp (ms).**
 * @method integer getLastUpdateTime() Obtain Last write time. **It is a Unix timestamp (ms).**
 * @method void setLastUpdateTime(integer $LastUpdateTime) Set Last write time. **It is a Unix timestamp (ms).**
 * @method integer getSubscriptionCount() Obtain Number of Subscriptions
 * @method void setSubscriptionCount(integer $SubscriptionCount) Set Number of Subscriptions
 * @method array getSubscriptionData() Obtain Subscribe to the relationship list.
 * @method void setSubscriptionData(array $SubscriptionData) Set Subscribe to the relationship list.
 * @method integer getMsgTTL() Obtain Message retention period. Unit: hour.
 * @method void setMsgTTL(integer $MsgTTL) Set Message retention period. Unit: hour.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeTopicResponse extends AbstractModel
{
    /**
     * @var string Instance ID
     */
    public $InstanceId;

    /**
     * @var string Topic name
     */
    public $Topic;

    /**
     * @var string Topic type.
UNSPECIFIED: not specified.
NORMAL: normal message.
FIFO: sequential message.
DELAY: delayed message.
TRANSACTION: transaction message.
     */
    public $TopicType;

    /**
     * @var string Remarks
     */
    public $Remark;

    /**
     * @var integer Creation time. **It is a Unix timestamp (ms).**
     */
    public $CreatedTime;

    /**
     * @var integer Last write time. **It is a Unix timestamp (ms).**
     */
    public $LastUpdateTime;

    /**
     * @var integer Number of Subscriptions
     */
    public $SubscriptionCount;

    /**
     * @var array Subscribe to the relationship list.
     */
    public $SubscriptionData;

    /**
     * @var integer Message retention period. Unit: hour.
     */
    public $MsgTTL;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param string $InstanceId Instance ID
     * @param string $Topic Topic name
     * @param string $TopicType Topic type.
UNSPECIFIED: not specified.
NORMAL: normal message.
FIFO: sequential message.
DELAY: delayed message.
TRANSACTION: transaction message.
     * @param string $Remark Remarks
     * @param integer $CreatedTime Creation time. **It is a Unix timestamp (ms).**
     * @param integer $LastUpdateTime Last write time. **It is a Unix timestamp (ms).**
     * @param integer $SubscriptionCount Number of Subscriptions
     * @param array $SubscriptionData Subscribe to the relationship list.
     * @param integer $MsgTTL Message retention period. Unit: hour.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("InstanceId",$param) and $param["InstanceId"] !== null) {
            $this->InstanceId = $param["InstanceId"];
        }

        if (array_key_exists("Topic",$param) and $param["Topic"] !== null) {
            $this->Topic = $param["Topic"];
        }

        if (array_key_exists("TopicType",$param) and $param["TopicType"] !== null) {
            $this->TopicType = $param["TopicType"];
        }

        if (array_key_exists("Remark",$param) and $param["Remark"] !== null) {
            $this->Remark = $param["Remark"];
        }

        if (array_key_exists("CreatedTime",$param) and $param["CreatedTime"] !== null) {
            $this->CreatedTime = $param["CreatedTime"];
        }

        if (array_key_exists("LastUpdateTime",$param) and $param["LastUpdateTime"] !== null) {
            $this->LastUpdateTime = $param["LastUpdateTime"];
        }

        if (array_key_exists("SubscriptionCount",$param) and $param["SubscriptionCount"] !== null) {
            $this->SubscriptionCount = $param["SubscriptionCount"];
        }

        if (array_key_exists("SubscriptionData",$param) and $param["SubscriptionData"] !== null) {
            $this->SubscriptionData = [];
            foreach ($param["SubscriptionData"] as $key => $value){
                $obj = new SubscriptionData();
                $obj->deserialize($value);
                array_push($this->SubscriptionData, $obj);
            }
        }

        if (array_key_exists("MsgTTL",$param) and $param["MsgTTL"] !== null) {
            $this->MsgTTL = $param["MsgTTL"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
